import com.troyworks.framework.ui.BaseComponent;
import com.troyworks.hsmf.AEvent;

/**
 * @author Troy Gardner
 */
class com.troyworks.framework.ui.ToolTip extends BaseComponent {
	public var label:String = "";
	public var background_mc:MovieClip;
	public var label_txt:TextField;
	
	function ToolTip(initialState : Function, hsmfName : String, aInit : Boolean) {
		super(initialState, hsmfName, true);
	}
	public function hide():Void{
	}
	public function show():Void{
	}
	public function setLabel(msg:String):Void{
		trace("toolTip.setLabel " +msg + " label_txt " + label_txt + " " + label_txt.text);
		label = msg;
		//label_txt.ht
		label_txt.text = msg;
		background_mc._width = label_txt._width + 40;
		background_mc._x = label_txt._x -20;
	}
	public function setX(num:Number):Void{
		
	}
	
	/*.................................................................*/
	function s0_viewAssetsLoaded(e : AEvent) : Function
	{
		this.onFunctionEnter ("s0_viewAssetsLoaded-", e, []);
		switch (e.sig)
		{
			case Q_ENTRY_SIG :
			{
				label_txt.autoSize = true;

				return null;
			}
		}
		return super.s0_viewAssetsLoaded(e);
	}
	/*.................................................................*/
	function s1_viewCreated(e : AEvent) : Function
	{
		this.onFunctionEnter ("s1_creatingView-", e, []);
		switch(e.sig)
		{
			case Q_ENTRY_SIG :
			{
				isReady = true;
				return null;
			}
		}
		return super.s0_viewAssetsLoaded(e);
	}
}